<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>在线引用文件</title>
<style>
code{ display:block; padding:5px; background-color:#efefef;}
</style>
</head>

<body>
<ul>
<li>
jquery and ui google cdn
<code>
&lt;script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
<br>
&lt;script&gt;<br>
google.load("jquery","1.6");<br>
google.load("jqueryui","1.8");
&lt;/script&gt;
</code>
防止被墙写法
<code>


    <div>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt;</div>
    <div>&lt;script&gt;!window.jQuery &amp;&amp;   document.write('&lt;script   src="jquery-1.4.3.min.js"&gt;&lt;\/script&gt;');&lt;/script&gt;</div>

</code></li>
<li>
headjs 异步加载引用写法
<code>

      <pre>// the most simple case. load and execute single script without blocking.<br>head.js("/path/to/file.js");<br> <br>// load a script and execute a function after it has been loaded<br>head.js("/path/to/file.js", function() {<br> <br>});<br> <br>// load files in parallel but execute them in sequence<br>head.js("file1.js", "file2.js", ... "fileN.js");<br> <br>// execute function after all scripts have been loaded<br>head.js("file1.js", "file2.js", function() {<br> <br>});<br> <br>// files are loaded in parallel and executed in order they arrive<br>head.js("file1.js");<br>head.js("file2.js");<br>head.js("file3.js");<br> <br>// the previous can also be written as<br>head.js("file1.js").js("file1.js").js("file3.js");</pre>
   
 </code>
</li>
</ul>
</body>
</html>
